<!DOCTYPE html>
<html lang="en">

<head>
    <#include "/jh/admin/components/meta.html" />
    <title>用户档案 ${metaTitleSuffix!}</title>
    <#include "/jh/admin/components/stylesheets.html" />
</head>

<body>
    <div id="app">
        <el-container>
            <#assign menuIndex="2-1" />
            <#include "/jh/admin/components/menu.html" />
            <el-container>
                <#include "/jh/admin/components/header.html" />
                <el-main>
                    <template>
                        <el-form ref="form" :model="info" label-width="100px" :rules="rules">
                            <el-tabs v-model="activeName" @tab-click="handleClick">
                                <#if hasPermission('STU_BASE')>
                                    <el-tab-pane label="个人信息" name="first">
                                        <el-row :gutter="0">
                                            <#if hasPermission('STU_NAME')>
                                                <el-col :span="12">
                                                    <el-form-item label="姓名" prop="name">
                                                        <el-input v-model="info.name" ${hasEditPermission('STU_NAME')}></el-input>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_SEX')>
                                                <el-col :span="12">
                                                    <el-form-item label="性别" prop="sex">
                                                        <el-select v-model="info.sex" ${hasEditPermission('STU_SEX')}>
                                                            <el-option label="请选择" :value="0" disabled></el-option>
                                                            <el-option label="男" :value="1"></el-option>
                                                            <el-option label="女" :value="2"></el-option>
                                                        </el-select>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_ENG_NAME')>
                                                <el-col :span="12">
                                                    <el-form-item label="英文名" prop="englishName">
                                                        <el-input v-model="info.englishName" ${hasEditPermission('STU_ENG_NAME')}></el-input>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_AGE')>
                                                <el-col :span="12">
                                                    <el-form-item label="年龄">
                                                        <el-input placeholder="请输入年龄" v-model="info.age" type='number' ${hasEditPermission('STU_AGE')}>
                                                        </el-input>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_MOBILE')>
                                                <el-col :span="12">
                                                    <el-form-item label="电话" prop="mobile">
                                                        <el-input v-model="info.mobile" autocomplete="off" @change='onMobileChanged' ${hasEditPermission('STU_MOBILE')}>
                                                            <el-button slot="append" @click="onCheck" icon="el-icon-search"></el-button>
                                                        </el-input>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_BIRTH')>
                                                <!-- <el-col :span="12">
                                                    <el-form-item label="出生日期">
                                                        <el-date-picker v-model="info.birth" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" ${hasEditPermission('STU_BIRTH')}>
                                                        </el-date-picker>
                                                    </el-form-item>
                                                </el-col> -->
                                            </#if>
                                            <#if hasPermission('STU_LOCATION')>
                                                <el-col :span="12">
                                                    <el-form-item label='所在地'>
                                                        <el-cascader :options="city" change-on-select filterable='true' clearable='true' v-model="location" ${hasEditPermission('STU_LOCATION')}></el-cascader>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_ADDRESS')>
                                                <el-col :span="12">
                                                    <el-form-item label="住址">
                                                        <el-input :rows="3" placeholder="请输入住址" v-model="info.address" ${hasEditPermission('STU_ADDRESS')}>
                                                        </el-input>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_SCHOOL')>
                                                <el-col :span="12">
                                                    <el-form-item label="校区" prop='schoolId'>
                                                        <el-select v-model="info.schoolId" placeholder="请选择校区" default-first-option ${hasEditPermission('STU_SCHOOL')}>
                                                            <el-option v-for="(item, index) in schools" :label="item.name" :value="item.id"></el-option>
                                                        </el-select>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_ID_CARD')>
                                                <el-col :span="12">
                                                    <el-form-item label="身份证">
                                                        <el-input v-model="info.idCard" ${hasEditPermission('STU_ID_CARD')}></el-input>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_AVAILABLE')>
                                                <el-col :span="12">
                                                    <el-form-item label="是否有效" prop='isAvailable'>
                                                        <el-switch v-model="isAvailableChecked" active-color="#13ce66" inactive-color="#ff4949" ${hasEditPermission('STU_AVAILABLE')}>
                                                        </el-switch>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_DEMO_FLAG')>
                                                <el-col :span="12">
                                                    <el-form-item label="Demo">
                                                        <el-switch size='small' v-model="isDemoChecked" active-color="#13ce66" inactive-color="#ff4949" ${hasEditPermission('STU_DEMO_FLAG')}>
                                                        </el-switch>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_DEMO_TEACHER')>
                                                <el-col :span="12">
                                                    <el-form-item label="demo老师">
                                                        <el-input v-model="info.demoTeacher" ${hasEditPermission('STU_DEMO_TEACHER')}></el-input>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_CODE')>
                                                <el-col :span="12">
                                                    <el-form-item label="学生编号">
                                                        <el-input v-model="info.code" ${hasEditPermission('STU_CODE')}></el-input>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_LT')>
                                                <el-col :span="12">
                                                    <el-form-item label="LT">
                                                        <el-input v-model="info.lt" ${hasEditPermission('STU_LT')}></el-input>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_EMERGENCY')>
                                                <el-col :span="12">
                                                    <el-form-item label="紧急联系人">
                                                        <el-input v-model="info.emergentContact" ${hasEditPermission('STU_EMERGENCY')}></el-input>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_FOLLOW_TYPE')>
                                                <el-col :span="12">
                                                    <el-form-item label="跟进类型">
                                                        <el-select v-model="info.followType" filterable placeholder="请选择跟进类型" ${hasEditPermission('STU_FOLLOW_TYPE')}>
                                                            <el-option v-for="item in followType" :value="item">
                                                            </el-option>
                                                        </el-select>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_DEGREE')>
                                                <el-col :span="12">
                                                    <el-form-item label="学历">
                                                        <el-select v-model="info.degree" placeholder="请选择学历" allow-create filterable default-first-option ${hasEditPermission('STU_DEGREE')}>
                                                            <el-option v-for='item in degreeType' :label="item" :value="item"></el-option>
                                                        </el-select>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_CLIENT_TYPE')>
                                                <el-col :span="12">
                                                    <el-form-item label='状态' prop='type'>
                                                        <el-select v-model="info.type" placeholder="请选择类型" ${hasEditPermission('STU_CLIENT_TYPE')}>
                                                            <el-option v-for="(item, index) in studentType" :label="item" :value="index">
                                                            </el-option>
                                                        </el-select>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_SCHOOL_STATUS')>
                                                <!-- <el-col :span="12">
                                                    <el-form-item label='学生状态'>
                                                        <el-select v-model="info.status" placeholder="学生状态" ${hasEditPermission('STU_SCHOOL_STATUS')}>
                                                            <el-option v-for="(item, index) in studentStatus" :label="item" :value="index">
                                                            </el-option>
                                                        </el-select>
                                                    </el-form-item>
                                                </el-col> -->
                                            </#if>
                                            <#if hasPermission('STU_CC')>
                                                <el-col :span="12">
                                                    <el-form-item label="CC" prop="ccId">
                                                        <el-select v-model="info.ccId" filterable placeholder="请选择CC" ${hasEditPermission('STU_CC')}>
                                                            <el-option v-for="item in ccStaffs" :key="item.id" :label="item.name" :value="item.id">
                                                            </el-option>
                                                        </el-select>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_TMK')>
                                                <el-col :span="12">
                                                    <el-form-item label="TMK" prop="tmkId">
                                                        <el-select v-model="info.tmkId" filterable placeholder="请选择TMK" ${hasEditPermission('STU_TMK')}>
                                                            <el-option v-for="item in tmkStaffs" :key="item.id" :label="item.name" :value="item.id">
                                                            </el-option>
                                                        </el-select>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_TA')>
                                                <el-col :span="12">
                                                    <el-form-item label="助教">
                                                        <el-select v-model="info.taId" filterable placeholder="请选择助教" ${hasEditPermission('STU_TA')}>
                                                            <el-option v-for="item in taStaffs" :key="item.id" :label="item.name" :value="item.id">
                                                            </el-option>
                                                        </el-select>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_TUIGUANG')>
                                                <el-col :span="12">
                                                    <el-form-item label="推广人">
                                                        <el-select v-model="info.tuiguangId" filterable placeholder="请选择推广人" ${hasEditPermission('STU_TUIGUANG')}>
                                                            <el-option v-for="item in tuiguangStaffs" :key="item.id" :label="item.name" :value="item.id">
                                                            </el-option>
                                                        </el-select>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_CHANNEL')>
                                                <el-col :span="12">
                                                    <el-form-item label='来源渠道' prop='channel'>
                                                        <el-cascader :options="channel" change-on-select filterable='true' clearable='true' v-model="selectedChannel" ${hasEditPermission('STU_CHANNEL')}></el-cascader>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <#if hasPermission('STU_MARK')>
                                                <el-col :span="12">
                                                    <el-form-item label="备注">
                                                        <el-input type="textarea" :rows="3" placeholder="" v-model="info.mark" ${hasEditPermission('STU_MARK')}>
                                                        </el-input>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <el-col :span="12">
                                                <el-form-item label="录入时间">
                                                    <el-input placeholder="录入时间" v-model="info.addTime" :disabled="true">
                                                    </el-input>
                                                </el-form-item>
                                            </el-col>
                                        </el-row>
                                    </el-tab-pane>
                                </#if>
                                <#if hasPermission('STU_FILE')>
                                    <!-- <el-tab-pane label="学生档案" name="second" v-if='info.type == 1'>
                                        <el-form-item label="允许选课">
                                            <el-switch v-model="canJoinCourseChecked" active-color="#13ce66" inactive-color="#ff4949">
                                            </el-switch>
                                        </el-form-item>
                                    </el-tab-pane> -->
                                </#if>
                                <#if hasPermission('STU_CONTRACT')>
                                    <el-tab-pane label="合同" name="forth" v-if='info.type == 1'>
                                        <el-row :gutter="0">
                                            <el-col :span="12">
                                                <el-form-item label="合同编号">
                                                    <el-input v-model="info.contract"></el-input>
                                                </el-form-item>
                                            </el-col>
                                            <!-- <el-col :span="12">
                                                <el-form-item label="在校时间">
                                                    <el-date-picker v-model="time" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" @change="onTimeChange" unlink-panels="true" default-value="2018-01-01">
                                                    </el-date-picker>
                                                </el-form-item>
                                            </el-col> -->
                                            <el-col :span="12">
                                                <el-form-item label="课程价格" prop='contractPrice'>
                                                    <el-input v-model="info.courseFee" type='number'></el-input>
                                                </el-form-item>
                                            </el-col>
                                            <!-- <el-col :span="12">
                                                <el-form-item label="合同价格" prop='contractPrice'>
                                                    <el-input v-model="info.contractPrice" type='number'></el-input>
                                                </el-form-item>
                                            </el-col> -->
                                            <el-col :span="12">
                                                <el-form-item label="合同时效期" prop='contractTime'>
                                                    <el-date-picker v-model="contractDate" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" @change="onContractDateChange" unlink-panels="true" default-value="2018-01-01" size='small'>
                                                    </el-date-picker>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12">
                                                <el-form-item label="课程期限" prop='term'>
                                                    <el-input placeholder="请输入" v-model="info.term" type='number'>
                                                        <template slot="append">月</template>
                                                    </el-input>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12">
                                                <el-form-item label="合同性质" prop='contractMode'>
                                                    <el-select v-model="info.contractMode" filterable placeholder="合同性质">
                                                        <el-option v-for="(item, index) in contractMode" :label="item" :value="item">
                                                        </el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12" v-if='info.contractMode == "续费"'>
                                                <el-form-item label="续费金额">
                                                    <el-input v-model="info.extraFee" type='number'></el-input>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12" v-if='info.contractMode == "续费"'>
                                                <el-form-item label='续费期限'>
                                                    <el-date-picker v-model="extraTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" @change="onExtraTimeChange" unlink-panels="true" size='small'>
                                                    </el-date-picker>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12" v-if='info.contractMode =="终止"'>
                                                <el-form-item label="终止原因">
                                                    <el-input v-model="info.contractEndReason"></el-input>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12">
                                                <el-form-item label="课程类型" prop='courseType'>
                                                    <el-select v-model="info.courseType" filterable placeholder="课程类型">
                                                        <el-option v-for="(item, index) in courseType" :label="item" :value="item">
                                                        </el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </el-col>
                                            <#if hasPermission('STU_CORE_CLASS_COUNT')>
                                                <el-col :span="12">
                                                    <el-form-item label="核心课数" prop='coreCourseLeft'>
                                                        <el-input-number v-model="info.coreCourseLeft" :min="0" :max="9999" label="核心课数" controls-position="right" ${hasEditPermission('STU_CORE_CLASS_COUNT')}></el-input-number>
                                                    </el-form-item>
                                                </el-col>
                                            </#if>
                                            <el-col :span="12">
                                                <el-form-item label="付款类型" prop='contractType'>
                                                    <el-select v-model="info.contractType" filterable placeholder="请选择付款类型">
                                                        <el-option v-for="(item, index) in contractType" :label="item" :value="index">
                                                        </el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </el-col>
                                            <template v-if='info.contractType == 0 || info.contractType == 2'>
                                                <el-col :span="12">
                                                    <el-form-item label="全款">
                                                        <el-input v-model="info.allPay" type='number'></el-input>
                                                    </el-form-item>
                                                </el-col>
                                            </template>
                                            <template v-if='info.contractType == 1'>
                                                <el-col :span="12">
                                                    <el-form-item label="分期产品">
                                                        <el-select v-model="info.payMethod" filterable placeholder="分期产品">
                                                            <el-option v-for="(item, index) in payMethod" :label="item" :value="item">
                                                            </el-option>
                                                        </el-select>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="12">
                                                    <el-form-item label="首付">
                                                        <el-input v-model="info.firstPay" type='number'></el-input>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="12">
                                                    <el-form-item label="剩余">
                                                        <el-input v-model="info.remainToPay" type='number'></el-input>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="12">
                                                    <el-form-item label="分期数">
                                                        <el-input v-model="info.payCount" type='number'></el-input>
                                                    </el-form-item>
                                                </el-col>
                                            </template>
                                            <template v-if='info.contractType == 2'>
                                                <el-col :span="12">
                                                    <el-form-item label="分期数">
                                                        <el-input v-model="info.payCount" type='number'></el-input>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="12">
                                                    <el-form-item label="每期金额">
                                                        <el-input v-model="info.payPerTime" type='number'></el-input>
                                                    </el-form-item>
                                                </el-col>
                                                <el-col :span="12">
                                                    <el-form-item label="还款日">
                                                        <el-input v-model="info.payDay" type='number'></el-input>
                                                    </el-form-item>
                                                </el-col>
                                            </template>
                                            <el-col :span="12">
                                                <el-form-item label="总级别" prop='studentLevel'>
                                                    <el-input v-model="info.studentLevel"></el-input>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12">
                                                <el-form-item label="转让">
                                                    <el-switch v-model="isTransfer" active-color="#13ce66" inactive-color="#ff4949">
                                                    </el-switch>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12" v-if='isTransfer'>
                                                <el-form-item label="转让金额">
                                                    <el-input v-model="info.transferFee" type='number'></el-input>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12" v-if='isTransfer'>
                                                <el-form-item label='转让期限'>
                                                    <el-date-picker v-model="transferTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" unlink-panels="true">
                                                    </el-date-picker>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12">
                                                <el-form-item label="延期">
                                                    <el-switch v-model="isDelay" active-color="#13ce66" inactive-color="#ff4949">
                                                    </el-switch>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12" v-if='isDelay'>
                                                <el-form-item label='延期时间'>
                                                    <el-date-picker v-model="delayTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" @change="onDelayTimeChange" unlink-panels="true">
                                                    </el-date-picker>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12" v-if='isDelay'>
                                                <el-form-item label="延期金额">
                                                    <el-input v-model="info.delayFee" type='number'></el-input>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12" v-if='isDelay'>
                                                <el-form-item label="延期原因">
                                                    <el-input v-model="info.delayReason"></el-input>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12">
                                                <el-form-item label="休学">
                                                    <el-switch v-model="isOff" active-color="#13ce66" inactive-color="#ff4949">
                                                    </el-switch>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12" v-if='isOff'>
                                                <el-form-item label='休学期限'>
                                                    <el-date-picker v-model="offTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" unlink-panels="true">
                                                    </el-date-picker>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12">
                                                <el-form-item label="备注">
                                                    <el-input v-model="info.finMark" type='textarea'></el-input>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12">
                                                <el-form-item label="附件">
                                                    <el-upload action="/jh/api/uploadFile" :on-success="handleSuccess" :on-preview="handlePreview" :on-remove="handleRemove" :before-remove="beforeRemove" limit="10" :on-exceed="handleExceed" :file-list="fileList">
                                                        <el-button size="small" type="primary">点击上传</el-button>
                                                    </el-upload>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="12">
                                                <el-form-item label="审核中">
                                                    <el-switch v-model="isReview" active-color="#13ce66" inactive-color="#ff4949" ${hasEditPermission('STU_AVAILABLE')}>
                                                    </el-switch>
                                                </el-form-item>
                                            </el-col>
                                        </el-row>
                                    </el-tab-pane>
                                </#if>
                                <#if hasPermission('STU_COURSE')>
                                    <el-tab-pane label="订课信息" name="third" v-if='info.type == 1'>
                                        <#if hasPermission('STU_LEVEL')>
                                            <el-form-item label="等级" prop='tag'>
                                                <el-select v-model="info.tag" placeholder="请选择等级" ${hasEditPermission('STU_LEVEL')}>
                                                    <el-option v-for="(item, index) in tags" :key="index" :label="item" :value="item">
                                                    </el-option>
                                                </el-select>
                                            </el-form-item>
                                        </#if>
                                        <#if hasPermission('STU_LOGIN_PASSWORD')>
                                            <el-form-item label="订课登录密码" prop='password'>
                                                <el-input v-model="info.password" type='password' ${hasEditPermission('STU_LOGIN_PASSWORD')}></el-input>
                                            </el-form-item>
                                        </#if>
                                        <#if hasPermission('STU_IS_ENABLE')>
                                            <el-form-item label="开通账号">
                                                <el-switch v-model="isDisableChecked" active-color="#13ce66" inactive-color="#ff4949" ${hasEditPermission('STU_IS_ENABLE')}>
                                                </el-switch>
                                            </el-form-item>
                                        </#if>
                                        <#if hasPermission('STU_IS_VIP')>
                                            <el-form-item label="VIP">
                                                <el-switch v-model="isVIPChecked" active-color="#13ce66" inactive-color="#ff4949" ${hasEditPermission('STU_IS_VIP')}>
                                                </el-switch>
                                            </el-form-item>
                                        </#if>
                                        <#if hasPermission('STU_IS_ALLOW_NORMAL')>
                                            <el-form-item label="允许选普通课" v-if='isVIPChecked == 1'>
                                                <el-switch v-model="canJoinNormalChecked" active-color="#13ce66" inactive-color="#ff4949" ${hasEditPermission('STU_IS_ALLOW_NORMAL')}>
                                                </el-switch>
                                            </el-form-item>
                                        </#if>
                                        <#if hasPermission('STU_IS_BLACK_LIST')>
                                            <el-form-item label="黑名单">
                                                <el-switch v-model="isBlackListChecked" active-color="#13ce66" inactive-color="#ff4949" ${hasEditPermission('STU_IS_BLACK_LIST')}>
                                                </el-switch>
                                            </el-form-item>
                                        </#if>
                                        <#if hasPermission('STU_IS_LEAVE')>
                                            <el-form-item label="离校">
                                                <el-switch v-model="isLeaveChecked" active-color="#13ce66" inactive-color="#ff4949" ${hasEditPermission('STU_IS_LEAVE')}>
                                                </el-switch>
                                            </el-form-item>
                                        </#if>
                                    </el-tab-pane>
                                </#if>
                                <#if hasPermission('STU_TRACE')>
                                    <el-tab-pane label="学生跟踪" name="fifth" v-if='info.id != null'>
                                        <div style="margin-bottom: 1rem;">
                                            <#if hasPermission('STU_VISIT')>
                                                <el-button @click="visit" ${hasEditPermission('STU_VISIT')}>到访记录</el-button>
                                            </#if>
                                            <#if hasPermission('STU_FOLLOW')>
                                                <el-button @click="follow" ${hasEditPermission('STU_FOLLOW')}>跟进记录</el-button>
                                            </#if>
                                            <#if hasPermission('STU_RECORD')>
                                                <el-button @click="record" ${hasEditPermission('STU_RECORD')}>学生记录</el-button>
                                            </#if>
                                            <#if hasPermission('STU_TEACHING_RECORD')>
                                                <el-button @click="teachingRecord" ${hasEditPermission('STU_TEACHING_RECORD')}>教学记录</el-button>
                                            </#if>
                                            <#if hasPermission('STU_HISTORY')>
                                                <el-button @click="courseHistory" ${hasEditPermission('STU_HISTORY')}>上课记录</el-button>
                                            </#if>
                                        </div>
                                    </el-tab-pane>
                                </#if>
                            </el-tabs>
                            <el-form-item>
                                <el-button type="primary" @click="prisubmit">提交</el-button>
                                <el-button @click="back">取消</el-button>
                            </el-form-item>
                        </el-form>
                    </template>
                </el-main>
            </el-container>
        </el-container>
        <#include "/jh/admin/components/footer.html" />
    </div>
    <#include "/jh/admin/components/scripts.html" />
    <script type="text/javascript" src="/jh/json/studentType.js"></script>
    <script type="text/javascript" src="/jh/json/city.json"></script>
    <script type="text/javascript" src="/jh/json/channel.json"></script>
    <script type="text/javascript">
    var vue = new Vue({
        el: '#app',
        data() {
            var validator = (rule, value, callback) => {
                if (rule.field == 'channel') {
                    if (this.selectedChannel == '') {
                        return callback(new Error('请输入'));
                    } else {
                        callback();
                    }
                } else if (rule.field == 'contractTime') {
                    if (this.contractDate == null) {
                        return callback(new Error('请输入'));
                    }
                    if (this.contractDate.length == 0) {
                        return callback(new Error('请输入'));
                    } else {
                        callback();
                    }
                } else if (rule.field == 'contractPrice') {
                    if (this.info.courseFee != null && this.info.courseFee != '') {
                        callback();
                    } else {
                        return callback(new Error('请输入'));
                    }
                } else if (rule.field == 'isAvailable') {
                    callback();
                } else if (rule.field == 'tag') {
                    callback();
                }
            };
            return {
                ccRules: {
                    contractPrice: [
                        { validator: validator, required: true, message: '请输入', trigger: 'blur' },
                    ],
                    contractTime: [
                        { validator: validator, required: true, message: '请输入', trigger: 'change' },
                    ],
                    term: [
                        { required: true, message: '请输入', trigger: 'blur' },
                    ],
                    contractMode: [
                        { required: true, message: '请输入', trigger: 'change' },
                    ],
                    contractType: [
                        { required: true, message: '请输入', trigger: 'change' },
                    ],
                    courseType: [
                        { required: true, message: '请输入', trigger: 'blur' },
                    ],
                    studentLevel: [
                        { required: true, message: '请输入', trigger: 'blur' },
                    ],
                    tag: [
                        { validator: validator, required: true, message: '请输入', trigger: 'change' },
                    ]
                },
                tmkRules: {
                    name: [
                        { required: true, message: '请输入', trigger: 'blur' },
                    ],
                    sex: [
                        { required: true, message: '请输入', trigger: 'change' },
                    ],
                    mobile: [
                        { required: true, message: '请输入', trigger: 'blur' },
                    ],
                    channel: [
                        { validator: validator, trigger: 'change', required: true },
                    ],
                    // ccId: [
                    //     { required: true, message: '请输入', trigger: 'change' },
                    // ],
                    tmkId: [
                        { required: true, message: '请输入', trigger: 'change' },
                    ],
                    tag: [
                        { validator: validator, required: true, message: '请输入', trigger: 'change' },
                    ]
                },
                salesRules: {
                    name: [
                        { required: true, message: '请输入', trigger: 'blur' },
                    ],
                    sex: [
                        { required: true, message: '请输入', trigger: 'change' },
                    ],
                    mobile: [
                        { required: true, message: '请输入', trigger: 'blur' },
                    ],
                    channel: [
                        { validator: validator, trigger: 'change', required: true },
                    ],
                    ccId: [
                        { required: true, message: '请输入', trigger: 'change' },
                    ],
                    tag: [
                        { validator: validator, required: true, message: '请输入', trigger: 'change' },
                    ]
                },
                finRules: {
                    coreCourseLeft: [
                        { required: true, message: '请输入', trigger: 'blur' },
                        // { required: true, min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
                    ],
                    name: [
                        { required: true, message: '请输入', trigger: 'blur' },
                        // { required: true, min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
                    ],
                    englishName: [
                        { required: true, message: '请输入', trigger: 'blur' },
                    ],
                    mobile: [
                        { required: true, message: '请输入', trigger: 'blur' },
                    ],
                    contractPrice: [
                        { validator: validator, required: true, message: '请输入', trigger: 'blur' },
                    ],
                    contractTime: [
                        { validator: validator, required: true, message: '请输入', trigger: 'change' },
                    ],
                    term: [
                        { required: true, message: '请输入', trigger: 'blur' },
                    ],
                    contractMode: [
                        { required: true, message: '请输入', trigger: 'change' },
                    ],
                    contractType: [
                        { required: true, message: '请输入', trigger: 'change' },
                    ],
                    type: [
                        { required: true, message: '请输入', trigger: 'change' },
                    ],
                    password: [
                        { required: true, message: '请输入', trigger: 'blur' },
                    ],
                    tag: [
                        { validator: validator, required: true, message: '请输入', trigger: 'change' },
                    ]
                },
                frontRules: {
                    name: [
                        { required: true, message: '请输入', trigger: 'blur' },
                        // { required: true, min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
                    ],
                    channel: [
                        { validator: validator, trigger: 'change', required: true, type: "array" },
                    ],
                    schoolId: [
                        { required: true, message: '请输入', trigger: 'change' },
                    ],
                    mobile: [
                        { required: true, message: '请输入', trigger: 'blur' },
                    ],
                    ccId: [
                        { required: true, message: '请输入', trigger: 'change' },
                    ],
                    isAvailable: [
                        { validator: validator, required: true, message: '请输入', trigger: 'change' },

                    ],
                    tag: [
                        { validator: validator, required: true, message: '请输入', trigger: 'change' },
                    ]
                },
                rules: {
                    coreCourseLeft: [
                        { required: false, message: '请输入', trigger: 'blur' },
                        // { required: true, min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
                    ],
                    name: [
                        { required: false, message: '请输入', trigger: 'blur' },
                    ],
                    englishName: [
                        { required: false, message: '请输入', trigger: 'blur' },
                    ],
                    mobile: [
                        { required: false, message: '请输入', trigger: 'blur' },
                    ],
                    contractPrice: [
                        { validator: validator, required: false, message: '请输入', trigger: 'blur' },
                    ],
                    contractTime: [
                        { validator: validator, required: false, message: '请输入', trigger: 'change' },
                    ],
                    term: [
                        { required: false, message: '请输入', trigger: 'blur' },
                    ],
                    contractMode: [
                        { required: false, message: '请输入合同性质', trigger: 'change' },
                    ],
                    contractType: [
                        { required: false, message: '请输入', trigger: 'change' },
                    ],
                    type: [
                        { required: false, message: '请输入', trigger: 'change' },
                    ],
                    sex: [
                        { required: false, message: '请输入', trigger: 'change' },
                    ],
                    mobile: [
                        { required: false, message: '请输入', trigger: 'blur' },
                    ],
                    channel: [
                        { validator: validator, trigger: 'change', required: false, type: "array" },
                    ],
                    ccId: [
                        { required: false, message: '请输入', trigger: 'change' },
                    ],
                    schoolId: [
                        { required: false, message: '请输入', trigger: 'change' },
                    ],
                    courseType: [
                        { required: false, message: '请输入', trigger: 'blur' },
                    ],
                    studentLevel: [
                        { required: false, message: '请输入', trigger: 'blur' },
                    ],
                    tmkId: [
                        { required: false, message: '请输入', trigger: 'change' },
                    ],
                    password: [
                        { required: false, message: '请输入', trigger: 'blur' },
                    ],
                    tag: [
                        { validator: validator, required: true, message: '请输入', trigger: 'change' },
                    ],
                    isAvailable: [
                        { validator: validator, required: false, message: '请输入', trigger: 'change' },

                    ]
                },
                isReview: false,
                inputRules: [{ required: true, message: '请输入1', trigger: 'blur' }, { min: 1, max: 15, message: '请输入4', trigger: 'blur' }],
                baseRules: [{ required: true, message: '请输入2', trigger: 'blur' }],
                selectRules: [{ required: true, message: '请输入3', trigger: 'change' }],
                isCC: Number('${isCC!0}') == 1,
                isFin: Number('${isFin!0}') == 1,
                isTuiguang: Number('${isTuiguang!0}') == 1,
                isTMK: Number('${isTMK!0}') == 1,
                isFront: Number('${isFront!0}') == 1,
                courseType: courseType,
                activeName: 'first',
                // activeName: 'forth',
                payMethod: payMethod,
                city: city,
                location: ['广东', '珠海'],
                info: {},
                schools: [],
                tags: [],
                // selectedTags: [],
                // staffs: [],
                ccStaffs: [],
                tmkStaffs: [],
                taStaffs: [],
                tuiguangStaffs: [],
                channel: channel,
                selectedChannel: [],
                time: '',
                contractDate: '',
                isVIPChecked: false,
                isBlackListChecked: false,
                isDisableChecked: false,
                isAvailableChecked: true,
                isDemoChecked: true,
                isLeaveChecked: false,
                canJoinCourseChecked: false,
                canJoinNormalChecked: false,
                options: [{
                    value: 0,
                    label: '在校'
                }, {
                    value: 1,
                    label: '离校'
                }],
                studentType: studentType,
                contractType: contractType,
                studentStatus: studentStatus,
                contractMode: contractMode,
                ruleForm: {
                    name: '',
                    region: '',
                    date1: '',
                    date2: '',
                    delivery: false,
                    type: [],
                    resource: '',
                    desc: ''
                },
                fileList: [],
                followType: followType,
                degreeType: degreeType,
                delayTime: [],
                extraTime: [],
                transferTime: [],
                offTime: [],
                isOff: false,
                isDelay: false,
                isTransfer: false
            }
        },
        watch: {

        },
        mounted: function() {
            if (this.isTMK) {
                this.rules = this.tmkRules
            } else if (this.isTuiguang) {
                this.rules = this.salesRules
            } else if (this.isFin) {
                this.rules = this.finRules
            } else if (this.isCC) {
                this.rules = this.ccRules
            } else if (this.isFront) {
                this.rules = this.frontRules
            }

            var schoolStr = '${schools!}';
            var tagStr = '${tags!}';
            var staffStr = '${staffs!}';
            var ccStaffStr = '${cc!}';
            var tmkStaffStr = '${tmk!}';
            var taStaffStr = '${ta!}';
            var tuiguangStaffStr = '${tuiguang!}';
            var infoStr = `${info!}`;
            if (schoolStr != '') {
                this.schools = JSON.parse(schoolStr);
            }
            if (tagStr != '') {
                this.tags = tagStr.split(",");
                this.tags.pop();
            }
            if (staffStr != '') {
                this.staffs = JSON.parse(staffStr);
            }
            if (ccStaffStr != '') {
                this.ccStaffs = JSON.parse(ccStaffStr);
            }
            if (tmkStaffStr != '') {
                this.tmkStaffs = JSON.parse(tmkStaffStr);
            }
            if (taStaffStr != '') {
                this.taStaffs = JSON.parse(taStaffStr);
            }
            if (tuiguangStaffStr != '') {
                this.tuiguangStaffs = JSON.parse(tuiguangStaffStr);
            }
            var today = '${today!}'
            if (today != '') {
                this.time = new Array;
                this.time.push(today);
                this.time.push(today);
                this.contractDate = new Array;
                this.contractDate.push(today);
                this.contractDate.push(today);
            }
            // console.log(this.staffs)
            // console.log(this.ccStaffs)
            // console.log(this.taStaffs.length)
            // console.log(this.tmkStaffs.length)
            // console.log(this.tuiguangStaffs.length)
            if (infoStr != '') {
                this.info = JSON.parse(infoStr);
                // if (this.info.tags != null && this.info.tags != "") {
                //     this.selectedTags = this.info.tags.split(",");
                //     this.selectedTags.pop();
                // }


                if (this.info.startTime != null && this.info.startTime != "") {
                    this.time = [this.info.startTime, this.info.endTime];
                }
                if (this.info.delayDateStart != null && this.info.delayDateStart != "") {
                    this.delayTime = [this.info.delayDateStart, this.info.delayDateEnd];
                }


                if (this.info.transferTimeStart != null && this.info.transferTimeStart != "") {
                    this.transferTime = [this.info.transferTimeStart, this.info.transferTimeEnd];
                }


                if (this.info.offTimeStart != null && this.info.offTimeStart != "") {
                    this.offTime = [this.info.offTimeStart, this.info.offTimeEnd];
                }

                if (this.info.extraTimeStart != null && this.info.extraTimeEnd != "") {
                    this.extraTime = [this.info.extraTimeStart, this.info.extraTimeEnd];
                }


                if (this.info.contractStartDate != null && this.info.contractStartDate != "") {
                    this.contractDate = [this.info.contractStartDate, this.info.contractEndDate];
                }
                if (this.info.location != null && this.info.location != "") {
                    this.location = this.info.location.split(",");
                    this.location.pop();
                }
                if (this.info.channel != null && this.info.channel != "") {
                    this.selectedChannel = this.info.channel.split(",");
                    this.selectedChannel.pop();
                }
                this.isVIPChecked = this.info.isVIP == 1;
                this.isBlackListChecked = this.info.isBlackList == 1;
                this.isDisableChecked = this.info.isDisable == 0;
                this.isAvailableChecked = this.info.isAvailable == 1;
                this.isDemoChecked = this.info.isDemo == 1;
                this.isLeaveChecked = this.info.isLeave == 1;
                this.canJoinCourseChecked = this.info.canJoinCourse == 1;
                this.canJoinNormalChecked = this.info.canJoinNormal == 1;
                this.isReview = this.info.isReview == 1;
                var studentMark = replaceBr(this.info.mark)
                var finMark = replaceBr(this.info.finMark)
                this.info.mark = studentMark
                this.info.finMark = finMark



                this.isTransfer = this.info.isTransfer == 1;
                this.isOff = this.info.isOff == 1;
                this.isDelay = this.info.isDelay == 1;

                if (this.info.attachment && this.info.attachment != '') {
                    var list = this.info.attachment.split(";");
                    list.pop();
                    for (var i = 0; i < list.length; i++) {
                        var map = {
                            name: list[i].split("=")[1],
                            url: list[i]
                        }
                        this.fileList.push(map);
                    }
                }
            }

            if (this.isTMK) {
                if (this.info.id == null) {
                    if (this.info.tmkId == null) {
                        var staffIdStr = '${staffId!""}'
                        if (staffIdStr != '') {
                            this.info.tmkId = Number(staffIdStr)
                        }
                    }
                }
            } else if (this.isCC) {
                if (this.info.id == null) {
                    if (this.info.ccId == null) {
                        var staffIdStr = '${staffId!""}'
                        if (staffIdStr != '') {
                            this.info.ccId = Number(staffIdStr)
                        }
                    }
                }
            }
        },
        methods: {
            newOnly(val) {
                if (val != null) {
                    return true
                }
                return false
            },
            onMobileChanged(val) {
                console.log(val)
                if (val == '') {
                    return
                }
                val = val.replace(/(^\s+)|(\s+$)/g, "");
                val = val.replace(/\s/g, "");
                this.info.mobile = val
                // if (val.length == 11) {
                // }
                this.onCheck()

            },
            handleClick(tab, event) {
                // console.log(tab, event);
            },
            onCheck() {
                // alert(this.info.mobile)
                var url = '/jh/admin/student/checkMobile'
                var param = Qs.stringify({
                    mobile: this.info.mobile
                })
                if (!checkMobile(this.info.mobile)) {
                    vue.$alert('电话号码错误.', '查询结果', {
                        type: 'warning',
                        confirmButtonText: '确定',
                        callback: action => {

                        }
                    });
                    return
                }
                loading();
                axios({
                        url: url,
                        method: 'post',
                        data: param,
                        headers: {
                            'Content-Type': 'application/x-www-form-urlencoded'
                        }
                    })
                    .then(function(response) {
                        endLoading();
                        if (response.data.status == 200) {
                            // msg("电话号码不存在");
                            vue.$alert('此号码可录入', '查询结果', {
                                type: 'success',
                                confirmButtonText: '确定',
                                callback: action => {

                                }
                            });
                        } else {
                            // msg(response.data.msg);
                            vue.$alert(response.data.msg, '查询结果', {
                                type: 'error',
                                confirmButtonText: '确定',
                                callback: action => {

                                }
                            });
                            // console.log(response.data);
                        }
                    })
                    .catch(function(error) {
                        endLoading();
                        msg("请求失败");
                        console.log(error);
                    });
            },
            prisubmit() {
                var self = this
                var back = this.$refs['form'].validate((valid) => {
                    if (valid) {
                        // alert('submit!');
                        self.submit()
                    } else {
                        // console.log('error submit!!');
                        msg('请完整填写信息')
                        return false;
                    }
                });
            },
            submit() {
                var self = this;
                // var tags = "";
                // for (var i = 0; i < self.selectedTags.length; i ++) {
                //     tags += self.selectedTags[i] + ",";
                // }
                var location = "";
                for (var i = 0; i < self.location.length; i++) {
                    location += self.location[i] + ",";
                }
                var channelStr = "";
                for (var i = 0; i < self.selectedChannel.length; i++) {
                    channelStr += self.selectedChannel[i] + ",";
                }
                var files = '';
                for (var i = 0; i < self.fileList.length; i++) {
                    files += self.fileList[i].url + ";";
                }

                var isCC = Number('${isCC!0}') == 1;
                // if (isCC) {
                //     if (this.info.contract == null) {
                //         msg('请填写合同编号')
                //         return;
                //     }
                //     if (this.info.contractPrice == null) {
                //         msg('请填写合同价格')
                //         return;
                //     }
                //     if (this.info.courseType == null) {
                //         msg('请填写课程类型')
                //         return;
                //     }
                //     if (this.info.contractType == null) {
                //         msg('请填写付款类型')
                //         return;
                //     }
                //     if (this.info.contractType == 0) {
                //         if (this.info.allPay == null) {
                //             msg('请填写全款金额')
                //             return;
                //         }
                //     } else if (this.info.contractType == 1) {
                //         if (this.info.payMethod == null) {
                //             msg('请填写分期产品')
                //             return;
                //         }
                //         if (this.info.firstPay == null) {
                //             msg('请填写首付金额')
                //             return;
                //         }
                //         if (this.info.remainToPay == null) {
                //             msg('请填写剩余金额')
                //             return;
                //         }
                //         if (this.info.payCount == null) {
                //             msg('请填写分期数')
                //             return;
                //         }
                //     }
                //     if (this.info.studentLevel == null) {
                //         msg('请填写学生级别')
                //         return;
                //     }
                //     if (this.info.courseFee == null) {
                //         msg('请填写课程费用')
                //         return;
                //     }
                // }
                var delayDateStart = ''
                var delayDateEnd = ''
                if (this.delayTime.length > 0) {
                    delayDateStart = this.delayTime[0]
                    delayDateEnd = this.delayTime[1]
                }


                var transferTimeStart = ''
                var transferTimeEnd = ''
                if (this.transferTime.length > 0) {
                    transferTimeStart = this.transferTime[0]
                    transferTimeEnd = this.transferTime[1]
                }


                var offTimeStart = ''
                var offTimeEnd = ''
                if (this.offTime.length > 0) {
                    offTimeStart = this.offTime[0]
                    offTimeEnd = this.offTime[1]
                }

                var extraTimeStart = ''
                var extraTimeEnd = ''
                if (this.extraTime.length > 0) {
                    extraTimeStart = this.extraTime[0]
                    extraTimeEnd = this.extraTime[1]
                }


                var param = Qs.stringify({
                    studentId: self.info.id,
                    name: self.info.name,
                    englishName: self.info.englishName,
                    birth: self.info.birth,
                    mobile: self.info.mobile,
                    idCard: self.info.idCard,
                    province: self.info.province,
                    city: self.info.city,
                    address: self.info.address,
                    schoolId: self.info.schoolId,
                    startTime: self.time[0],
                    endTime: self.time[1],
                    emergentContact: self.info.emergentContact,
                    contract: self.info.contract,
                    contractPrice: self.info.contractPrice,
                    contractType: self.info.contractType,
                    contractStartDate: self.contractDate[0],
                    contractEndDate: self.contractDate[1],
                    code: self.info.code,
                    password: self.info.password,
                    demoTeacher: self.info.demoTeacher,
                    ccId: self.info.ccId,
                    tmkId: self.info.tmkId,
                    taId: self.info.taId,
                    tuiguangId: self.info.tuiguangId,
                    isVIP: self.isVIPChecked ? 1 : 0,
                    isBlackList: self.isBlackListChecked ? 1 : 0,
                    isDisable: self.isDisableChecked ? 0 : 1,
                    isDemo: self.isDemoChecked ? 1 : 0,
                    isLeave: self.isLeaveChecked ? 1 : 0,
                    canJoinCourse: self.canJoinCourseChecked ? 1 : 0,
                    canJoinNormal: self.canJoinNormalChecked ? 1 : 0,
                    type: self.info.type,
                    status: self.info.status,
                    channlId: self.info.channlId,
                    coreCourseLeft: self.info.coreCourseLeft,
                    tag: self.info.tag,
                    mark: replaceN(self.info.mark),
                    isAvailable: self.isAvailableChecked ? 1 : 0,
                    location: location,
                    channel: channelStr,
                    attachment: files,
                    followType: self.info.followType,
                    age: self.info.age,
                    degree: self.info.degree,
                    lt: self.info.lt,
                    allPay: self.info.allPay,
                    payMethod: self.info.payMethod,
                    firstPay: self.info.firstPay,
                    remainToPay: self.info.remainToPay,
                    payCount: self.info.payCount,
                    studentLevel: self.info.studentLevel,
                    courseFee: self.info.courseFee,
                    finMark: replaceN(self.info.finMark),
                    courseType: self.info.courseType,
                    term: self.info.term,
                    isReview: self.isReview ? 1 : 0,
                    contractMode: self.info.contractMode,
                    contractEndReason: self.info.contractEndReason,
                    payPerTime: self.info.payPerTime,
                    payDay: self.info.payDay,
                    delayFee: self.info.delayFee,
                    delayReason: self.info.delayReason,
                    delayDateStart: delayDateStart,
                    delayDateEnd: delayDateEnd,
                    isDelay: self.isDelay ? 1 : 0,
                    isTransfer: self.isTransfer ? 1 : 0,
                    isOff: self.isOff ? 1 : 0,
                    offTimeStart: offTimeStart,
                    offTimeEnd: offTimeEnd,
                    transferTimeStart: transferTimeStart,
                    transferTimeEnd: transferTimeEnd,
                    transferFee: self.info.transferFee,
                    extraTimeStart: extraTimeStart,
                    extraTimeEnd: extraTimeEnd,
                    extraFee: self.info.extraFee,
                    sex: self.info.sex
                });
                // console.log(param)
                // return
                loading();
                axios({
                        url: '/jh/admin/student/submit',
                        method: 'post',
                        data: param,
                        headers: {
                            'Content-Type': 'application/x-www-form-urlencoded'
                        }
                    })
                    .then(function(response) {
                        if (response.data.status == 200) {
                            endLoading();
                            var url = '${referer!""}'
                            if (url == '') {
                                url = "/jh/admin/student/list";
                            }
                            window.location.href = url
                            // msg("登录成功");
                        } else {
                            endLoading();
                            msg(response.data.msg);
                            console.log(response.data);
                        }
                    })
                    .catch(function(error) {
                        endLoading();
                        msg("提交失败");
                        console.log(error);
                    });
            },
            onExtraTimeChange() {},
            onDelayTimeChange() {

            },
            onTimeChange(val) {
                // console.log(val);
            },
            onContractDateChange(val) {
                // console.log(val);
            },
            visit() {
                window.location.href = "/jh/admin/studentVisit?studentId=" + this.info.id;
            },
            follow() {
                window.location.href = "/jh/admin/studentFollow?studentId=" + this.info.id;
            },
            teachingRecord() {
                window.location.href = "/jh/admin/teachingRecord/list?studentId=" + this.info.id;
            },
            record() {
                window.location.href = "/jh/admin/studentRecord?studentId=" + this.info.id;
            },
            courseHistory() {
                window.location.href = "/jh/admin/student/courseHistory?studentId=" + this.info.id;
            },
            handleSuccess(response, file, fileList) {
                var self = this;
                // self.fileList = new Array;
                self.fileList.push({
                    name: response.info.split("=")[1],
                    url: response.info
                });
            },
            handlePreview(file) {
                // window.location.href = file.url;
                window.open(file.url);
            },
            handleRemove(file, fileList) {
                // this.fileList = new Array;
                var idx = this.fileList.indexOf(file);
                this.fileList.splice(idx, 1);
            },
            handleExceed(files, fileList) {
                this.$message.warning('只能上传 1 个文件');
            },
            beforeRemove(file, fileList) {
                return this.$confirm('确定移除 ' + file.name + '？');
            },
            back() {
                window.history.back();
            }
        }
    })
    </script>
    <style type="text/css">
    .title {
        font-size: 18px;
        font-weight: bold;
    }

    .topicItem {
        margin-bottom: 1rem;
    }

    .topic-del {
        margin-left: 1rem;
        cursor: pointer;
    }

    .el-input.is-disabled .el-input__inner {
        color: #606266;
    }

    .el-cascader.is-disabled .el-cascader__label {
        color: #606266;
    }
    </style>
    <script type="text/javascript">
    function checkMobile(phone) {
        if (!(/^1[34578]\d{9}$/.test(phone))) {
            return false;
        }
        return true;
    }
    </script>
    <#include "/jh/admin/components/msg.html" />
</body>

</html>